package com.atguigu.yygh.client.cmn;

import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("service-cmn")//调用接口所在服务
//@Repository//可以不加
public interface DictFeignClient {
    //远程调用时参数注解必须加参数"value" 不加可能会报错
    @ApiOperation(value = "获取数据字典名称")
    @GetMapping("/admin/cmn/dict/getName/{value}")
    public String getName(@PathVariable("value") String value);

    @ApiOperation(value = "获取数据字典名称")
    @GetMapping("/admin/cmn/dict/getName/{dictCode}/{value}")
    public String getName(@PathVariable("dictCode") String dictCode, @PathVariable("value") String value);
}
